num_chick=int(input())

oldweights=input().split()
weights=[int(i) for i in oldweights]

weights=sorted(weights)
print("weights: ",weights)


def cal_day(num_chick, weights):
    i = 0
    for k in range(1,num_chick+1):

        while weights[i] < k:
            i += 1
            if i == num_chick-1:
                if weights[i] >= k:
                    return k+1
                else:
                    return k

print(cal_day(num_chick,weights))
